<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>

    <meta charset="UTF-8">
    <title>movies</title>
    <style>
        a{
            display: block;
            padding: 10px;
            text-decoration: none;
            color: #0033FF;
        }
    </style>

    <script src="js/request.js"></script>
</head>
<body>

    <!-- 用于显示播放手机作为服务器的视频 -->

<ol id="movies_parent">
</ol>

<script>
    const listView = document.getElementById("movies_parent");

    var data = [
    ];

    function parseResult(){
        let innerString = "";
    for(let i =0; i<data.length; ++i){
        innerString+= "<li><a href=\""+data[i].path+"\" target=\"_blank\">"+data[i].name+"</a></li>"
    }

    listView.innerHTML = innerString;
    }
</script>



<script type="text/javascript" src="http://load_star.gitee.io/htmlminifuncs/js/getrequest.js"></script>
<script type="text/javascript">
    getRequest("http://" + location.host
 + "/file/videos", "", function(res){
        // console.log(JSON.parse(res).data)
        data = JSON.parse(res).data
        parseResult()
    })
</script>
</body>
</html>
